﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CodeGenerator.Models;
using CodeGenerator.ClassServices;
using CodeGenerator.Generators;

namespace CodeGenerator.Models
{
   public class LayoutSectionModel
    {
        public virtual int?      Id { get; set; }
        public virtual string   SectionName	 { get; set; }
        public virtual int      LayoutColumn { get; set; }
        public virtual int      Width { get; set; }
        public virtual int      Height { get; set; }
        public virtual int      TabkeyOrder { get; set; }
        public virtual int      SeqNo { get; set; }
        public virtual int      ShowScrollbars { get; set; }
        public virtual int      ShowLabel { get; set; }
        public virtual ClassModel ClassModel { get; set; }

        public LayoutSectionModel() { }

        internal LayoutSectionModel(LayoutSectionModelDto dot)
        {
            if (dot != null)
            {
                Id = dot.Id;
                SectionName = dot.SectionName;
                LayoutColumn = dot.LayoutColumn;
                Width = dot.Width;
                Height = dot.Height;
                TabkeyOrder = dot.TabkeyOrder;
                SeqNo = dot.SeqNo;
                ShowScrollbars = dot.ShowScrollbars;
                ShowLabel = dot.ShowLabel;
                ClassModel = new ClassModel { Id = dot.ClassModel };

            }
        }
    }
}
